gsap.to(".image1", {
    scale:0.8,
    left:-78,
    top:0
});
gsap.to(".image2", {
    scale:0.8,
    right:78,
    top:'50%',
    opacity:1
});


ScrollTrigger.create({
    trigger: '.section2',
    start: '-=600 top',
    end: '+=500',
    scrub: true,//跟随滚动
    // pin: true,//固定屏幕
    markers:true,//标记
    animation: gsap.timeline()
        .to('.w1', { 'margin-left': 0, opacity: 1 },0.1)
        .to('.w2', { 'margin-left': 0, opacity: 1 },0.5)
        .to('.w3', { 'margin-left': 0, opacity: 1 },0.9)
})

ScrollTrigger.create({
    trigger: '.section3',
    start: 'top top',
    end: '+=2000',
    scrub: true,//跟随滚动
    pin: true,//固定屏幕 
    markers:true,//标记
    onUpdate(self){
        try{
            const {progress} = self
            const video = document.querySelector('.section3 .video1')
            let prate = (progress+0.4)
            video.currentTime = video.duration * prate
            if(prate > 1){
                video.style.opacity = 0
            }else{
                video.style.opacity = 1
            }
        }catch(e){}
    },
    animation:gsap.timeline()
    .to('.section3 .list .l2',{'transform':'scale(1.5)'},'>')
    .to('.section3 .list .l2',{opacity:1},'<')
    .to('.section3 .list',{opacity:1},'<')
    .to('.section3 .list .l2',{'transform':'scale(1)'})
    .to('.section3 .list .l1',{opacity:1,top:0},1)
    .to('.section3 .list .l3',{opacity:1,top:0},1)
})

ScrollTrigger.create({
    trigger: '.section4',
    start: 'top top',
    end: '+=300',
    scrub: true,//跟随滚动
    pin: true,//固定屏幕 
    markers:true,//标记
    animation:gsap.timeline()
    .to('.section4 .des',{opacity:1,bottom:'200px'})
    .to('.section4 .cover',{width:'100%',height:'100%',borderRadius:0},'<')
})

ScrollTrigger.create({
    trigger: '.section5',
    start: 'top top',
    end: '+=2000',
    scrub: true,//跟随滚动
    pin: true,//固定屏幕 
    markers:true,//标记
    animation:gsap.timeline()
    .to('.section5 .cover',{width:'100%',height:'100%',borderRadius:0},'<')
    .to('.section5 .des',{opacity:1,bottom:'50%'},'<')
})